Skip to content

Conversation

@HiFiPhile
Copy link
Collaborator

@HiFiPhile HiFiPhile commented Nov 25, 2025

Update linker and compiler flag.

Fix #3363

Signed-off-by: Zixun LI <[email protected]>
Copilot AI review requested due to automatic review settings November 25, 2025 09:50
Copilot finished reviewing on behalf of HiFiPhile November 25, 2025 09:53
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes the STM32N6 IAR build by updating linker script paths and adding missing CMSE (Cortex-M Security Extensions) compiler flags. The STM32N6 family uses Cortex-M55 with TrustZone security features and requires FSBL (First Stage Boot Loader) configuration targeting AXISRAM2.

  • Updated linker script references from _flash to _axisram2_fsbl variants for both GNU and IAR toolchains
  • Added CMSE compiler flags (-mcmse for Clang, --cmse for IAR) to align with existing GCC configuration

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
hw/bsp/stm32n6/family.cmake Updated default linker script paths from _flash to _axisram2_fsbl for both GNU and IAR toolchains to support FSBL boot configuration
examples/build_system/cmake/cpu/cortex-m55.cmake Added CMSE flags for Clang and IAR toolchains to enable Cortex-M Security Extensions, aligning with existing GCC configuration

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@sonarqubecloud
Copy link

@hathach hathach merged commit 1281462 into master Nov 25, 2025
171 checks passed
@hathach hathach deleted the n6_build branch November 25, 2025 11:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

IAR build with CMAKE for stm32n6 fails

3 participants